#pragma once

#include "Include.h"
#include "GomokuBoard.h"

struct Play
{
	std::list<Square*> PreviousMoves;
	Square *ResultingMove;

	~Play()
	{
		for(std::list<Square*>::iterator it = PreviousMoves.begin(); it != PreviousMoves.end(); it++)
		{
			delete *it;
		}
		delete ResultingMove;
	}
};

class Playbook
{
	std::list<Play*> m_plays;

public:
	Playbook();
	~Playbook();

	void AddPlay(std::list<Square*> previousMoves, Square *resultingMove);

	bool CheckForMove(std::list<Square*> previousMoves, Move &out);
};
